*mw_evolution.do	JEP		01/23/2015

* Builds figure with evolution of the minimum wage

*************************** Change log ********************************** 
/*

*/

clear 
version 13.1

* Project info
cap project, doinfo
if _rc==198 {
	if c(os)=="Unix" loc master "/home/jperez/AA_Minimum_Wage" 
 else if c(username)=="J16339" loc master "B:\Col_Minimum_Wage"
 else if c(username)=="A15858" loc master "B:\Col_Minimum_Wage"
	else loc master "C:/Users/jorpp/Dropbox (Brown)/Col_Minimum_Wage"
	loc pr=0
}
else {
	local master "`r(pdir)'"
	local doname "`r(dofile)'" 	
	project, original("`master'/Data/Importable/MW/serie_salario_minimo_mensual.dta")
	loc pr=1
}

use "`master'/Data/Importable/MW/serie_salario_minimo_mensual.dta" , clear
* tsset year
tsset date
set scheme s1color
keep if year<=2006

gen lsm = log(sm_real_jan_90_eoy)
gen delta = 100*s12.lsm

twoway (tsline sm_real_jan_90_eoy, lcolor(black)) (tsline sm_real_jan_90, lcolor(gray) lpattern(dot) lwidth(medthick) tline(1999m12, lcolor(cranberry)) tlabel(1990m1(24)2005m12,format(%tmCCYY))) (tsline delta, yaxis(2) lcolor(cranberry) lpattern(dash)) , xtitle(Year) xlabel(1991(2)2005, angle(horizontal) noticks) legend(label(1 "End-of-year") label(2 "Monthly") label(3 "Change in End-of-year (Secondary axis)")) ytitle("Index", axis(1)) ytitle("Change", axis(2)) yline(0, lpattern(solid) lcolor(black) axis(2)) bgcolor(white) ylab(,noticks angle(horizontal)) ylab(, axis(2) noticks angle(horizontal))

/*
graph export "`master'/Doc/slides_lacea/fig/mw.eps", replace
! epstopdf "`master'/Doc/slides_lacea/fig/mw.eps"
erase "`master'/Doc/slides_lacea/fig/mw.eps"
*/

graph export "`master'/Doc/tosubmit2/fig/mw.pdf", replace
graph export "`master'/Doc/tosubmit2/fig/mw.png", replace
graph export "`master'/Doc/tosubmit2/ILR-Figs/Fig2_mw.png", replace
*! epstopdf "`master'/Doc/tosubmit2/fig/mw.eps"
*erase "`master'/Doc/tosubmit2/fig/mw.eps""


if `pr' project, creates("`master'/Doc/tosubmit2/fig/mw.pdf")


